 #!/usr/bin/python
 # -*- coding: utf-8 -*-


# Echo server program
import socket
import os

HOST = ''
PORT = 60007 # port between firewallagent and bbw2

while 1:	
	s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
	s.bind((HOST, PORT))
	s.listen(1)
	conn, addr = s.accept()
	print 'Connected by', addr
	while 1:
		data = conn.recv(1024)
		if not data: break
		
		senddata=None
		
		senddata=raw_input("Enter the orderno: ")
			
		conn.send(senddata) # i got the message here now should send it to the bbw2
		
	conn.close()

